import 'dart:async';

import 'package:flutter/services.dart';

const String _channelName = "network_event";

class NetWorkEvent {
  static const _eventChannel = const EventChannel(_channelName);
  static Stream<String> networkStatus() {
    return _eventChannel
        .receiveBroadcastStream()
        .map((convert) => convert.toString());
  }
}
